using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text;
using webapp4U.BOL;

namespace webapp4U.UI
{
    public partial class _Default : System.Web.UI.Page
    {
        string filePath;
        protected void Page_Load(object sender, EventArgs e)
        {
            Title.TitleName = ResourceManager.GetString("Product_ThongtinThanhtoan");
            if (Globals.LangVietNam())
                filePath = Request.PhysicalApplicationPath + "UserUpload/Thanhtoan.txt";
            else
                filePath = Request.PhysicalApplicationPath + "UserUpload/Thanhtoan_en.txt";
        }


        public string ReadTextFile()
        {
            if (!System.IO.File.Exists(filePath))
            {
                return "";
            }

            using (StreamReader sr = System.IO.File.OpenText(filePath))
            {
                StringBuilder text = new StringBuilder();
                String input;
                while ((input = sr.ReadLine()) != null)
                {
                    text.AppendLine(input);
                }
                sr.Close();
                return text.ToString();
            }
        }

    }
}